<template>
  <div class='password'>
    <header>修改密码</header>
    <main>
      <div v-for="(item, index) in modelData" :key="index" class="box">
        <span class="title">{{item.label}}：</span>
        <el-input v-model="info[item.prop]" :placeholder="item.placeholder" :type="item.type" class=""></el-input>
        <el-button type="primary" v-if="item.button" class="btn ml10" @click="item.button.click">{{item.button.label}}</el-button>
      </div>
      <el-button type="primary" class="submit-btn" @click="sureEdit">修改</el-button>
    </main>
  </div>
</template>
<script>
export default {
  components: {},
  name: "",
  data() {
    return {
      modelData:[
        {prop:"",label:"账号",placeholder:"请输入账号"},
        {prop:"",label:"验证码",placeholder:"请输入验证码",button:{label:"获取验证码",click:this.getCheckNum}},
        {prop:"",label:"新密码",type:"password",placeholder:"请输入新密码(6-18位)"},
      ],
      info:{}
    };
  },
  methods: {
    getCheckNum(){

    },

    /**
     * @name 确认修改
     */
    sureEdit(){
      console.log("确认修改");
      
    }
  },
  created() {}
};
</script>
<style lang="scss" scoped>
.password {
  font-size: 14px;
  color: #666;

  header{
    line-height: 50px;
    text-indent: 20px;
    box-sizing: border-box;
    border-bottom: 1px solid #eee;
  }

  main{
    padding: 60px;
    min-height: 600px;

    >div{
      display: flex;
      margin-bottom: 30px;

      .title{
        display: inline-block;
        min-width: 100px;
        text-align: right;
        line-height: 40px;
      }

      .el-input{
        width: 320px;
      }
    }
    .submit-btn{
      width: 320px;
      margin-top: 20px;
      margin-left: 100px;
    }
  }
}
</style>